//
//  YLInvitingFriendsModel.m
//  YLFinanceService
//
//  Created by she1323 on 2017/12/6.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLInvitingFriendsModel.h"

@implementation YLInvitingFriendsModel

- (void)setEffectiveDateText:(NSString *)effectiveDateText
{
    
    _effectiveDateText = effectiveDateText;
    
    NSDateFormatter* dateFormat = [[NSDateFormatter alloc] init];//实例化一个NSDateFormatter对象
    
    [dateFormat setDateFormat:@"yyyy/MM/dd"];//设定时间格式,这里可以设置成自己需要的格式
    
    NSDate *date =[dateFormat dateFromString:effectiveDateText];
    
    [dateFormat setDateFormat:@"yyyy.MM.dd"];//设定时间格式,这里可以设置成自己需要的格式
    
    _effectiveDateText = [dateFormat stringFromDate:date];
}

- (void)setCustomerTel:(NSString *)customerTel
{
    _customerTel = customerTel;
    
    if (customerTel.length > 10) {
        NSString *str = [customerTel substringWithRange:NSMakeRange(4, 4)];
       _customerTel = [customerTel stringByReplacingOccurrencesOfString:str withString:@"****"];
    }
    
}

@end

@implementation YLInvitingFriendsItem

+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass
{
    return @{@"item" : [YLInvitingFriendsModel class]};
}

@end
